<?php
session_start(); 
if (empty($_SESSION['nombre']))
	echo "<meta http-equiv='Refresh' content='0;url=../../index.php'>";
?>
<!DOCTYPE html>
<head>
<title>Formulario nuevo usuario</title>

<script type="text/javascript" src="../../bootstrap/scripts/md5.js"></script>
<link href="../../bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../../bootstrap/css/view.css" rel="stylesheet">
<script type="text/javascript" src="../../bootstrap/scripts/view.js"></script>
<script type="text/javascript" src="../../bootstrap/scripts/jquery.js"></script>
<script type="text/javascript" src="../../bootstrap/scripts/scripts4.js"></script>
<script type="text/javascript" src="../../bootstrap/scripts/scripts.js"></script>
<script type="text/javascript" src="../../bootstrap/scripts/calendar.js"></script>

 

<link href="../bootstrap/css/cupertino/jquery.ui.all.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../bootstrap/js/bootstrap.min.js"></script>  
<script type="text/javascript" src="../../bootstrap/js/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="../../bootstrap/js/jquery.ui.datepicker.min.js"></script>

<script type="text/javascript">
		function cargarDatos() 
		{
			
		  $(function () 
		  {
		    $.ajax({                                      
		      url: 'cargardatos.php',                       
		      data: "id=rol",                       
		      dataType: "json",                
		      success: function(data)          
				{
				
					for(f=0;f<data.length;f+=2)
					{
						$("<option value='"+data[f]+"'>"+data[f+1]+"</option>").appendTo("#roles");		
					}
		      }
		    });
		  });
		}
	</script>
</head>
<body id="main_body" onload="cargarDatos()">
<div id="a_header">
		<div class="container">
			<div class="row">
				<div class="span10">
					<a href="/demoerp/dashboard/">
					<img src="../../imagenes/CRM HV alta.png" width="175" height="110" style="float:left;" alt="" />					</a>
					<div style="display:inline-block; margin-top:20px;">
						<h3 style="margin:0px;">Sistema de Administraci&oacute;n y Gesti&oacute;n de Clientes (CRM)</h3>
					</div>
				</div>
			
				<div class="btn-group pull-right upan">
						  <button type="button" class="btn btn-primary" id ="drop"><span class= "glyphicon glyphicon-user"><?php if (! empty($_SESSION['nombre'])) echo("   ". $_SESSION['user']);?></span></button>
						  <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" id="drop2">
						    <span class="caret"></span>
						  </button>
						  
						  <ul class="dropdown-menu" role="menu">
						  
						    <li><a href="../../TableroInicio.php" title="Tablero Principal">Inicio</a></li>
						     <li class="divider"></li>
						    <li><a href="../../cerrar_sesion.php" title="Cerrar sesi&oacute;n">Salir</a></li>
						  </ul>
					</div>
					
				
			</div>
		</div>
 	</div> <!--  fin header -->
<div style="background-color:#0455A7; height:3px;"></div>		
	<img id="top" src="../../imagenes/top.png" alt="">
	<div id="form_container">
	
		<h1><a>Creando Nuevo Usuario</a></h1>
		<form id="form_727146" class="appnitro" name="formulario"  method="post" action="" onsubmit="InsertDatosProveedor(); return false" style="background-color: #f2f9f2">
		<div class="form_description">
			<h2>Ingrese datos de usuario.</h2>
			<p>Al terminar presione enviar datos</p>
		</div>						
		<ul >
		<li id="li_1" >
		<label class="description" for="element_1">Nombre Completo </label>
		<span>
			<input id="nombre" name= "element_1_1"   class="element text" maxlength="255" size="8" value=""/>
			<label>Nombre</label>
		</span>
		<span>
			<input id="apellido" name= "element_1_2" class="element text" maxlength="255" size="14" value=""/>
			<label>Apellido</label>
		</span> 
		</li>		<li id="li_2" >
		<label class="description" for="element_2">C&eacute;dula </label>
		<div>
			<input id="cedula" name="element_2" class="element text medium" type="text" maxlength="255" value=""/> 
		</div> 
		</li>	
		<li id="li_2" >
		<label class="description" for="element_2">Correo: </label>
		<div>
			<input id="correo" name="correo" class="element text medium" type="email" maxlength="255" value=""/> 
		</div> 
		</li>	
		<li id="li_3" >
		<label class="description" for="element_3">Usuario </label>
		<div>
			<input id="user" name="element_3" required class="element text medium" type="text" maxlength="255" value=""/> 
		</div> 
		</li>		<li id="li_4" >
		<label class="description" for="element_4">Contrase&ntilde;a inicial </label>
		<div>
			<input id="pass" name="element_4" required  class="element text medium" type="password" maxlength="255" value=""/> 
		</div> 
		</li>		<li id="li_5" >
		<label class="description" for="element_5">Rol de Usuario </label>
		<div>
		<select class="element select medium" id="roles" name="element_5"> 
			<option value="" selected="selected"></option>
		</select>
		<label class="description" for="activo">Usuario Activo</label>
		<input type="checkbox" name="activo" value="Activo" id="activo" checked> 
		</div> 
		</li>
			
				<li class="buttons">
			   	<input id="enviar" class="btn btn-success" type="submit" name="submit" value="Enviar Datos" />
				<input id="cancelar" class="btn btn-warning" type="button" name="cancelar" value="Cancelar" />
		</li>
		</ul>
		</form>	
		
	</div>
	<img id="bottom" src="../../imagenes/bottom.png" alt="">
	<!--  footer -->
    <img id="bottom" src="../../imagenes/top.png" alt="">
    <img id="bottom" src="../../imagenes/bottom.png" alt="">
    <footer style="margin-top: 20px; background-color:#FFF;">
		<div style="background-color:#00f; height:5px;"></div>
        <div class="container" style="height:100px;">
			<div class="row">
				<div class="span2" style="float:right;">
					<p style="">Desarrollado por:</p>
					<a href="http://www.3tech-panama.com"><img src="../../imagenes/3techpaylogo.png"alt="3tech panama" style="width:134px; height:50px; float:right;" /></a>
			   </div>
			</div>
		</div>
        <div style="background-color:#0000FF; height:25px;">
            <div class="container" >
                <p style="margin-left: 10px; color:#FFF;">Copyright &copy; 2013 HOSANNA. Todos los derechos reservados. </p>
            </div>
        </div>	
    </footer>
    
	</body>
	
</html>